<!DOCTYPE html>
<html>
  <head>
    <title><%= title %> - Microblog</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link rel="stylesheet" href="/stylesheets//bootstrap.min.css">
    <link rel="stylesheet" href="/stylesheets/style.css">
    <link href="/images/logo.png" rel="shortcut icon">
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="/javascripts/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="/javascripts/bootstrap.min.js"></script>
    
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>
        <script src="http://cdn.bootcss.com/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
  	<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="/">Microblog</a>
        </div>
        <div class="collapse navbar-collapse">
          <ul class="nav navbar-nav">
            <li><a href="/">首页</a></li>
            <% if(!locals.user){%>
            <li><a href="/login">登录</a></li>
            <li><a href="/reg">注册</a></li>
            <% }else{ %>
            <li><a href="/logout">登出</a></li>
            <% } %>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </div>
    <div class="container">
      <% if (locals.success) { %>
        <div class="alert alert-success alert-dismissable">
        <%= success %>
        </div>
      <% } %>
      <% if (locals.error) { %>
        <div class="alert alert-danger alert-dismissable">
        <%= error %>
        </div>
      <% } %>

    </div><!-- /.container -->
    <%- body %> 
    <hr />
    <div class="container">
      <footer>
    	<p>&copy; <a href="http://ydhl2013.sinaapp.com/" target="_blank">移动互联团队</a> 2014</p>
	  </footer>
    </div><!-- /.container -->
  </body>
</html>